package router

import (
	"github.com/gin-gonic/gin"
	"guns-go/controller/v1"
)

func InitUserRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
	UserRouter := Router.Group("")
	{
		UserRouter.GET("getLoginUser", v1.GetLoginUser)
		UserRouter.GET("logout", v1.Logout)
		UserRouter.GET("sysUser/page", v1.UserPage)
		UserRouter.GET("sysUser/detail", v1.UserDetail)
		UserRouter.POST("sysUser/resetPwd", v1.ResetPwd)
		UserRouter.GET("sysUser/ownRole", v1.OwnRole)
		UserRouter.GET("sysUser/ownData", v1.OwnData)
		UserRouter.POST("sysUser/delete", v1.UserDelete)
		UserRouter.POST("sysUser/add", v1.UserAdd)
		UserRouter.POST("sysUser/edit", v1.UserEdit)
		UserRouter.POST("sysUser/grantRole", v1.UserGrantRole)
		UserRouter.POST("sysUser/grantData", v1.UserGrantData)
		UserRouter.POST("sysUser/changeStatus", v1.ChangeStatus)
		UserRouter.POST("sysUser/updateInfo", v1.UpdateUserInfo)
		UserRouter.POST("sysUser/updatePwd", v1.UpdatePwd)
		UserRouter.POST("sysUser/updateAvatar", v1.UpdateAvatar)
		UserRouter.GET("sysUser/selector", v1.Selector)
	}
	return UserRouter
}
